/**
 * 页面样式
 */
.container {
  display: flex;
  padding: 30px 16px;
  box-sizing: border-box;
  justify-content: space-between;
  background-color: #f0f2f7;
}
#content {
  width: calc(100vw - 400px);
  height: calc(100vh - 60px);
  padding: 0 50px;
  border-radius: 16px;
  position: relative;
  overflow-y: scroll;
  box-sizing: border-box;
  background-color: #fff;
  box-shadow: 0 13px 15px rgb(31 45 61 / 10%);
}
#nav {
  width: 300px;
  height: calc(100vh - 60px);
  overflow-y: scroll;
  top: 32px;
  right: 8px;
  z-index: 100;
  border-radius: 16px;
  padding: 8px;
  box-sizing: border-box;
  background-color: #fff;
  box-shadow: 0 13px 15px rgb(31 45 61 / 10%);
}
.tag_H2 {
  padding-left: 16px;
}
.tag_H3 {
  padding-left: 32px;
}

/* 行号样式 */
.hljs-ln-numbers {
  user-select: none;
  text-align: center;
  color: #999;
  border-right: 1px solid #999;
  vertical-align: top;
  padding-right: 5px;
}

.hljs-ln-code {
  padding: 0 10px;
}

.hljs-ln td {
  padding: 2px 6px 2px 8px;
}

/* 滚动条美化 */
#nav::-webkit-scrollbar {
  width: 4px;
  height: 4px;
  background-color: transparent;
}

/* 滚动条轨道部分 */
#nav::-webkit-scrollbar-track {
  background-color: transparent;
}

/* 滚动条滑块部分 */
#nav::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background-image: linear-gradient(135deg, #09f, #3c9);
}

/**
 * 移动端样式适配
 */
@media (max-width: 380px) {
  #content {
    width: 100%;
    padding: 8px;
    margin: 0;
  }
  #content p {
    font-size: 18px;
    line-height: 26px;
  }
  #nav {
    display: none;
  }
}

/**
 * 代码样式美化
 */

#content pre {
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
  line-height: 1.2;
  color: #fff;
  background: #111;
  border-radius: 5px;
  overflow-x: scroll;
}

#content code {
  color: #a6e22e;
  font-size: 1rem;
  font-weight: normal;
  font-family: Consolas, 'Courier New', Courier, FreeMono, monospace;
  background: #111;
  border-radius: 2px;
}

#content p code,
#content li > code,
#content h2 > code,
#content h3 > code {
  padding-left: 3px;
  padding-right: 3px;
  color: #c7254e;
  background: #f9f2f4;
}

#content h2 {
  margin-top: 50px;
  margin-bottom: 0px;
  padding-top: 20px;
  padding-bottom: 0px;
  font-size: 18px;
  text-align: left;
  border-top: 2px solid #666;
  counter-increment: section;
}

#content h2:before {
  content: counter(section) '. ';
}

#content h3 {
  margin-top: 50px;
  margin-bottom: 0px;
  padding-top: 20px;
  padding-bottom: 0px;
  text-align: left;
  border-top: 1px dotted #777;
}

#content h2:hover,
#content h3:hover {
  color: #ed1c24;
}

code[class*='language-'],
pre[class*='language-'] {
  color: #a6e22e;
  text-shadow: 0 1px rgba(0, 0, 0, 0.3);
  font-family: Consolas, Monaco, 'Andale Mono', monospace;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  tab-size: 4;
  hyphens: none;
}
